<h1>Thêm thuốc mới</h1>
<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'drug-form',
	'enableAjaxValidation'=>false,
        'htmlOptions' => array('enctype' => 'multipart/form-data',)
)); ?>

	<p class="note">Các trường <span class="required">*</span> là bắt buộc.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'id_type'); ?>
		<?php echo $form->dropDownlist($model,'id_type',$model->getIdTypeDrug()); ?>
		<?php echo $form->error($model,'id_type'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'id_brand'); ?>
		<?php echo $form->dropDownlist($model,'id_brand',$model->getIdBrand()); ?>
		<?php echo $form->error($model,'id_brand'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>
        <div class="row">
		<?php echo $form->labelEx($model,'priceDrug'); ?>
		<?php echo $form->textField($model,'priceDrug'); ?>
		<?php echo $form->error($model,'priceDrug'); ?>
	</div>
        
	<div class="row">
		<?php echo $form->labelEx($model,'description'); ?>
		<?php echo $form->textArea($model,'description',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'description'); ?>
	</div>
        
	<div class="row">
            <?php
                echo $form->labelEx($model,'images');
                echo Chtml::activeFileField($model, 'images');
                echo Chtml::error($model, 'images');
            ?>
	</div>
        <div class="row">
		<?php echo $form->hiddenField($model,'hidden',array('value'=>$model->idStore)); ?>
	</div>
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->